package edu.tostronger.scu.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import edu.tostronger.scu.entity.User;
import edu.tostronger.scu.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Controller
@RequestMapping("/sql_web")
@Api(value="userCtrl",description="用户登录、注册、更新信息")
public class UserContrlloer {
	
	@Autowired
	UserService userService;
	
	@RequestMapping(value="/",method=RequestMethod.GET)
	@ApiOperation(value="用户注册")
	public String register(@RequestBody User user) {
		System.out.println(userService.getUser("").getName());
		return "index";
	}
	
}
